import { useResponseSuccess } from '~/utils/response';

export default eventHandler(() => {
  const trends = {
    occupancyTrend: [
      { date: '2024-01-01', value: 65.2 },
      { date: '2024-01-02', value: 68.5 },
      { date: '2024-01-03', value: 72.1 },
      { date: '2024-01-04', value: 70.8 },
      { date: '2024-01-05', value: 75.3 },
      { date: '2024-01-06', value: 78.9 },
      { date: '2024-01-07', value: 82.4 },
      { date: '2024-01-08', value: 79.6 },
      { date: '2024-01-09', value: 76.2 },
      { date: '2024-01-10', value: 73.8 },
      { date: '2024-01-11', value: 71.5 },
      { date: '2024-01-12', value: 69.2 },
      { date: '2024-01-13', value: 67.8 },
      { date: '2024-01-14', value: 70.1 },
    ],
    costAnalysis: [
      { category: '酒店', value: 45.2, percentage: 35 },
      { category: '温泉', value: 28.6, percentage: 22 },
      { category: '餐饮', value: 23.4, percentage: 18 },
      { category: '医疗', value: 18.7, percentage: 14 },
      { category: '其他', value: 15.1, percentage: 11 },
    ],
    utilizationByType: [
      { type: '物理资源', value: 78.5 },
      { type: '人力资源', value: 85.2 },
      { type: '数字资源', value: 92.1 },
      { type: '服务资源', value: 76.8 },
    ],
    efficiencyTrend: [
      { date: '2024-01-01', value: 82.1 },
      { date: '2024-01-02', value: 84.3 },
      { date: '2024-01-03', value: 86.7 },
      { date: '2024-01-04', value: 85.9 },
      { date: '2024-01-05', value: 88.2 },
      { date: '2024-01-06', value: 90.1 },
      { date: '2024-01-07', value: 89.5 },
      { date: '2024-01-08', value: 87.8 },
      { date: '2024-01-09', value: 86.4 },
      { date: '2024-01-10', value: 85.2 },
      { date: '2024-01-11', value: 83.9 },
      { date: '2024-01-12', value: 82.6 },
      { date: '2024-01-13', value: 81.3 },
      { date: '2024-01-14', value: 83.7 },
    ],
    faultAnalysis: [
      { type: '设备故障', count: 8, percentage: 40 },
      { type: '系统错误', count: 5, percentage: 25 },
      { type: '人为操作', count: 4, percentage: 20 },
      { type: '网络问题', count: 3, percentage: 15 },
    ],
  };

  return useResponseSuccess(trends);
});
